home *** CD-ROM | disk | FTP | other *** search
- 90 print"[147]":poke53280,6:poke53281,6
- 100 rem vector finder
- 105 dim m(3),a(3):q$="y"
- 110 x=0:y=0
- 120 def fn r(x)=(int(x*1000+.5))/1000
- 130 for i=1 to 2
- 140 print
- 150 print "magnitude of vector";i;
- 160 input m(i)
- 170 print "angle of vector";i;
- 180 input a(i)
- 190 a(i)=a(i)*(NULL)/180
- 200 y=m(i)*sin(a(i))+y
- 210 x=m(i)*cos(a(i))+x
- 220 next i
- 230 m(3)=fn r(sqr(x*x+y*y))
- 240 a(3)=fn r((atn(y/x))*180/(NULL))
- 250 if x<0 then a(3)=a(3)+180
- 260 if a(3)<0 then a(3)=a(3)+360
- 270 if m(3)=0 then a(3)=0
- 280 print
- 290 print "magnitude of resultant vector =";m(3)
- 300 print "angle of resultant vector =";a(3)
- 310 print
- 320 print "figure another";
- 330 input q$
- 340 if q$="y" then 110
-